home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-06 | 647 b | 40 lines | [TEXT/MSET] |
- \ A few general words needed by the selection environment.
-
- \ ***** QuickDraw *********
-
-
- : InitCursor arrowcurs ; \ familiar names die hard
-
- : PtInRect { x y rptr -- b }
- word0 x y pack rptr call PtInRect i->l ;
-
- : mDrawString ( addr len -- )
- str255 call DrawString ;
-
- : mStringWidth \ ( addr len -- width )
- \ Returns width of string in current font
- str255 >r word0 r> call StringWidth word0 ;
-
-
- \ **** Numeric Conversion ****
-
- : number>$ ( n -- addr len )
- dup 0<
- IF
- abs 0 <# #s & - hold
- ELSE
- 0 <# #s
- THEN
- #> ;
-
- endload
-
- *** EXAMPLE USE
-
- 20 40 temprect PtInRect .
-
- " Hello World" mDrawString
-
- " Hello World" mStringWidth .
-
-